using HuiLian.Common.Input;
using HuiLian.Service.Platform.Leakpoint.Input;
using HuiLian.Common.Output;
using HuiLian.Model.Platform;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace HuiLian.Service.Platform.Leakpoint
{
    /// <summary>
    /// 漏水点记录接口
    /// </summary>
    public interface ILeakpointService
    {
        /// <summary>
        /// 获取漏水点记录信息
        /// </summary>
        /// <param name="id">主键</param>
        /// <returns></returns>
        Task<IResponseOutput> GetAsync(long id);

        /// <summary>
        /// 查询漏水点记录信息
        /// </summary>
        /// <param name="input">分页信息</param>
        /// <returns></returns>
        Task<IResponseOutput> PageAsync(PageInput<LeakpointEntity> input);

        /// <summary>
        /// 添加漏水点记录信息
        /// </summary>
        /// <param name="input">漏水点记录信息</param>
        /// <returns></returns>
        Task<IResponseOutput> AddAsync(LeakpointAddInput input);

        /// <summary>
        /// 更新漏水点记录信息
        /// </summary>
        /// <param name="input">漏水点记录信息</param>
        /// <returns></returns>
        Task<IResponseOutput> UpdateAsync(LeakpointUpdateInput input);

        /// <summary>
        /// 删除漏水点记录信息
        /// </summary>
        /// <param name="id">主键</param>
        /// <returns></returns>
        Task<IResponseOutput> DeleteAsync(long id);

        /// <summary>
        /// 软删除漏水点记录信息
        /// </summary>
        /// <param name="id">主键</param>
        /// <returns></returns>
        Task<IResponseOutput> SoftDeleteAsync(long id);

        /// <summary>
        /// 批量软删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<IResponseOutput> BatchSoftDeleteAsync(long[] ids);

        /// <summary>
        /// 添加列表，如果实体Id存在，就不添加
        /// </summary>
        /// <param name="leakpoints"></param>
        /// <returns></returns>
        Task<IResponseOutput> AddListAsync(List<LeakpointEntity> leakpoints);

        /// <summary>
        /// 管网绑定
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<IResponseOutput> PipeBind(PipeBindInput input);

        /// <summary>
        /// 漏水点关联管线
        /// </summary>
        /// <param name="leakpoints"></param>
        /// <returns></returns>
        Task<IResponseOutput> GuanLianPipeAsync(List<LeakpointEntity> leakpoints);

        /// <summary>
        /// 更新管线的破损次数
        /// </summary>
        /// <returns></returns>
        Task<IResponseOutput> UpdateCount();
    }
}
